<template>
<!-- 快捷入口 -->
<div class="quick-entry">
    <card-home title="快捷入口" icon="/images/home/ziyuan.png">
        <div class="items">
            <div 
            class="item"
            v-for="item in options"
            :key="item.title"
            v-czc="['首页', '导航' , item.title , 0 , `userCenter-btn-${item.nodeid}`]"
            @click="clickHandler(item)">
                <div class="item-img">
                    <img :src="item.img" alt="">
                </div>
                <div class="item-title">{{item.title}}</div>
            </div>
        </div>
    </card-home>
</div>
    
</template>

<script>
import CardHome from '../../components/card-home.vue';

export default {
    components:{CardHome},
    data() {
        return {
            options:[
                {
                    title:'项目企业搜索',
                    img: require('@images/user/zbss.png'),
                    path:'/home',
                    nodeid:'bidSearch',
                },
                {
                    title:'商机人脉',
                    img: require('@images/user/qzkh.png'),
                    path:'/business-contact',
                    nodeid:'businessContact',
                },
                {
                    title:'投标方案库',
                    img: require('@images/user/tbfa.png'),
                    path:'/document',
                    nodeid:'document',
                },
                {
                    title:'投标文件制作',
                    img: require('@images/user/tbwj.png'),
                    path:'/application/biddingfiletool',
                    nodeid:'biddingfiletool',
                },
                {
                    title:'数据报表',
                    img: require('@images/user/sjdc.png'),
                    path: '/tools/data-export?data=month',
                    nodeid: 'dataExport',
                },
                {
                    title:'数据统计',
                    img: require('@images/user/zbqy.png'),
                    path: '/tools/data-export?data=figure',
                    nodeid: 'dataExport',
                },
            ]
        }
    },
    methods:{
        clickHandler:function(val){
            var {path} = val;

            window.open(path);
        }
    }
}
</script>

<style lang="scss" scoped>
@import '@css/var.scss';    

.quick-entry{
    .title {
        font-weight: 600;
    }
    .items {
        display: flex;
        justify-content: space-between;
        padding: 10px 10px 0;

        .item {
            flex: 1;

            div {
                text-align: center;
                margin-top: 10px;
                cursor: pointer;
            }

            span {
                margin-top: 15px;
            }

            .item-img {
                text-align: center;
                
                img {
                    width: 23px;
                    height: 23px;
                }
            }
        }
    }
}
</style>